﻿using System.Collections.Generic;
using System.Linq;
using Coleotrack.Data.Contracts;

namespace Coleotrack.Data
{
    public class Area : Entity, IValidation
    {
        public virtual string Name { get; set; }

        public virtual Project Project { get; set; }

        public virtual Area Parent { get; set; }

        public virtual bool IsValid()
        {
            return GetRuleViolations().Count() == 0;
        }

        public virtual IEnumerable<RuleViolation> GetRuleViolations()
        {
            yield break;
        }
    }
}
